package com.itheima.mall.web.cms;

import com.itheima.mall.commons.result.Result;
import com.itheima.mall.dubbo.api.cms.CmsPrefrenceAreaService;
import com.itheima.mall.entity.domain.cms.PrefrenceArea;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("prefrenceArea")
public class CmsPrefrenceAreaController {
    @DubboReference
    private CmsPrefrenceAreaService prefrenceAreaService;
    @GetMapping("listAll")
    public Result listAll(){
        List<PrefrenceArea> list = prefrenceAreaService.list();
        return Result.success(list);
    }
}
